package com.demo2do.boyle.client.service;

import java.util.List;

import com.demo2do.boyle.common.entity.customer.Customer;
import com.demo2do.boyle.common.entity.customer.message.CustomerMessage;
import com.demo2do.boyle.common.entity.customer.message.Type;
import com.demo2do.core.service.GenericService;

/**
 * 
 * @author mohanlan
 *
 */
public interface CustomerMessageService extends GenericService<CustomerMessage> {
	
	/**
	 * List all customer message by customerId
	 * 
	 * @param customer
	 * @return
	 */
	public List<CustomerMessage> list(Customer customer);
	
	/**
	 * Count the unread messages 
	 * 
	 * @param customer
	 * @return
	 */
	public int messageCount(Customer customer);
	
	/**
	 * Create a new message
	 * 
	 * @param customer
	 */
	public void create(Customer customer, String content, Type type);

}
